<extend name="./Common/View/Public/form.html" />
<block name="page_title">添加身份</block>
<block name="main">
        <form class="layui-form" method="post" action="sys/identity/insert" lay-filter="pageForm">

            <div class="layui-form-item">
                <label class="layui-form-label">身份代码</label>
                <div class="layui-input-inline">
                    <input type="text" name="code" maxlength="30" minlength="1" required lay-verify="required|length" placeholder="请输入身份代码" autocomplete="off" class="layui-input" />
                </div>
                <div class="layui-form-mid layui-word-aux">1-20个英文或数字</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">角色名称</label>
                <div class="layui-input-inline">
                    <input type="text" name="title" maxlength="30" minlength="1" required lay-verify="required|length" placeholder="请输入身份名称" autocomplete="off" class="layui-input" />
                </div>
                <div class="layui-form-mid layui-word-aux">1-6个英文或汉字</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">默认角色</label>
                <div class="layui-input-block">
                    <select name="role_id" id="role_id" lay-filter="role_id" value="0" api="sys/role/slist?status=1" empty="请选择">
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">身份状态</label>
                <div class="layui-input-block">
                    {:W('Todo/Dict/radio',array('STATUS','status',1))}
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">身份说明</label>
                <div class="layui-input-block">
                    <textarea name="remark" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="pageForm">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </block>